import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory(),
    routes : [
        {
            path:'/',
            name:'index',
            component : () => import('../views/index.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/',
            name:'Main',
            component : () => import('../views/Main.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/hotel/Hotel',
            name:'Hotel',
            component : () => import('../views/hotel/Hotel.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/hotel/detailHotel/:id',
            name:'detailHotel',
            component : () => import('../views/hotel/detailHotel.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/attraction/Attraction',
            name:'Attraction',
            component : () => import('../views/attraction/Attraction.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/attraction/detailAttraction/:id',
            name:'detailAttraction',
            component : () => import('../views/attraction/detailAttraction.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/travelAgency/TravelAgency',
            name:'TravelAgency',
            component : () => import('../views/travelAgency/TravelAgency.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/travelAgency/detailTravelAgency/:id',
            name:'detailTravelAgency',
            component : () => import('../views/travelAgency/detailTravelAgency.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
        {
            path:'/guide/Guide',
            name:'Guide',
            component : () => import('../views/guide/Guide.vue'),
            beforeEnter : (to, from, next) => {
                next()
            }
        },
    ]
})

export default router